﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Account : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MembershipUser user = Membership.GetUser();
        DVDTableAdapters.Customer2TableAdapter ta = new DVDTableAdapters.Customer2TableAdapter();

        if (user != null)
        {
            DetailsView1.DataSource = ta.GetData((Guid)user.ProviderUserKey);
            DetailsView1.DataBind();
            DVDTableAdapters.Message1TableAdapter ta1 = new DVDTableAdapters.Message1TableAdapter();
            GridView1.DataSource = ta1.GetData((Guid)user.ProviderUserKey);
            GridView1.DataBind();

        }
        else {
            Response.Redirect("~/404.aspx");
        }
    }
}